Method and apparatus of scaling window constraint for worst case bandwidth consideration for reference picture resampling in video coding

ABSTRACT

Method and apparatus of coding a video sequence, are disclosed. According to the method, a bitstream corresponding to encoded data of the video sequence is generated at an encoder side or received at a decoder side, where the bitstream complies with a bitstream conformance that one or more constraints are satisfied. The constraints are related to a set of RPR (Reference Picture Resampling) parameters including scaling window width or height of a current picture, scaling window width or height of a reference picture, current picture width or height, and maximum picture width or height specified for the video sequence. Scaling information for the RPR mode is derived using the set of RPR parameters. A target picture of the video sequence is then encoded at the encoder side or decoded at the decoder side by utilizing the scaling information when the RPR mode is enabled for the target picture.

CROSS REFERENCE TO RELATED APPLICATIONS

The present invention claims priority to U.S. Provisional Patent Application, Ser. No. 62/946,542, filed on Dec. 11, 2019, U.S. Provisional Patent Application, Ser. No. 62/953,232, filed on Dec. 24, 2019 and U.S. Provisional Patent Application, Ser. No. 62/954,020, filed on Dec. 27, 2019. The U.S. Provisional Patent Applications are hereby incorporated by reference in their entireties.

FIELD OF THE INVENTION

The present invention relates to video coding incorporating Reference Picture Resampling (RPR) coding tool. In particular, the present invention relates to constraining RPR parameters to alleviate the worst-case memory bandwidth.

BACKGROUND AND RELATED ART

The High Efficiency Video Coding (HEVC) standard has been developed under the joint video project of the ITU-T Video Coding Experts Group (VCEG) and the ISO/IEC Moving Picture Experts Group (MPEG) standardization organizations, and is especially with partnership known as the Joint Collaborative Team on Video Coding (JCT-VC). The emerging video coding standard development, named Versatile Video Coding (VVC), has taken place in recent year as a next generation video coding beyond HEVC. VVC supports Reference Picture Resampling (RPR) as a tool for adaptive streaming services to support the on-the-fly upsampling and downsamplinq motion compensation. Techniques related to adaptive streaming services are reviewed as follows.

Reference Picture Resampling (RPR)

During the development of VVC, according to “Requirements for a Future Video Coding Standard”, “the standard shall support fast representation switching in the case of adaptive streaming services that offer multiple representations of the same content, each having different properties (e.g. spatial resolution or sample bit-depth).” In real-time video communication, allowing resolution change within a coded video sequence without inserting an I picture can not only adapt the video data to dynamic channel conditions or user preference seamlessly, but also remove the beating effect caused by I pictures. A hypothetical example of Adaptive Resolution Change (ARC) with Reference Picture Resampling (RPR) is shown in FIG. 1, where the current picture (110) is predicted from reference pictures (Ref0 120 and Ref1 130) of different sizes. As shown in FIG. 1, reference picture Ref0 (120) has lower resolution than the current picture (110). In order to use reference picture Ref0 as a reference, Ref0 has to be up-scaled to the same resolution as the current picture. Reference picture Ref1 (130) has higher resolution than the current picture (110). In order to use reference picture Ref1 as a reference, Ref1 has to be down-scaled to the same resolution as the current picture.

To support the spatial scalability, the picture size of the reference picture can be different from the current picture, which is useful for streaming applications. Methods for supporting Reference Picture Resampling (RPR), which is also referred as Adaptive Resolution Change (ARC), has been studied for inclusion into VVC specification. At the 14th JVET meeting in Geneva, several contributions on RPR were submitted for discussion during the meeting.

When RPR is used, a picture size ratio is derived from the reference picture width and height and the current picture width and height. The picture size ratio is constrained to be within a range of [⅛ to 2]. In other words, the picture size ratio is between ⅛ and 2 inclusive. The picture width/height in luma samples can be signaled in the bitstream, such as PPS, and the semantics are shown as follow.

pic_width_in_luma_samples specifies the width of each decoded picture referring to the PPS in units of luma samples. pic_width_in_luma_samples shall not be equal to 0, shall be an integer multiple of Max(8, MinCbSizeY), and shall be less than or equal to pic_width_max_in_luma_samples.

When subpics_present_flag is equal to 1 or ref_pic_resampling_enabled_flag equal to 0, the value of pic_width_in_luma_samples shall be equal to pic_width_max_in_luma_samples.

pic_height_in_luma_samples specifies the height of each decoded picture referring to the PPS in units of luma samples. pic_height_in_luma_samples shall not be equal to 0 and shall be an integer multiple of Max(8, MinCbSizeY), and shall be less than or equal to pic_height_max_in_luma_samples.

When subpics_present_flag is equal to 1 or ref_pic_resampling_enabled_flag equal to 0, the value of pic_height_in_luma_samples shall be equal to pic_height_max_in_luma_samples.

When the picture size of the current picture and reference pictures are specified, the following constraint shall be satisified. This constraint limits the picture size ratio of the reference picture to the current picture to be within the range of [1/8, 2].

Let refPicWidthInLumaSamples and refPicHeightInLumaSamples be the pic_width_in_luma_samples and pic_height_in_luma_samples, respectively, of a reference picture of a current picture referring to this PPS. It is a requirement of bitstream conformance that all of the following conditions are satisfied: pic_width_in_luma_samples*2 shall be greater than or equal to refPicWidthInLumaSamples. pic_height_in_luma_samples*2 shall be greater than or equal to refPicHeightInLumaSamples. pic_width_in_luma_samples shall be less than or equal to refPicWidthInLumaSamples*8. pic_height_in_luma_samples shall be less than or equal to refPicHeightInLumaSamples*8.

In VVC, a scaling ratio and scaling offsets for RPR are derived from the syntax information signaled in PPS. The PPS syntaxes are shown in the following table.

TABLE 1 Picture parameter set RBSP syntax for scaling ratio and scaling offsets Descriptor pic_parameter_set_rbsp( ) { pps_pic_parameter_set_id ue(v) pps_seq_parameter_set_id  u(4) pic_width_in_luma_samples ue(v) pic_height_in_luma_samples ue(v) conformance_window_flag  u(1) if( conformance_window_flag ) { conf_win_left_offset ue(v) conf_win_right_offset ue(v) conf_win_top_offset ue(v) conf_win_bottom_offset ue(v) } scaling_window_flag  u(1) if( scaling_window_flag ) { scaling_win_left_offset ue(v) scaling_win_right_offset ue(v) scaling_win_top_offset ue(v) scaling_win_bottom_offset ue(v) } ...

The semantic of the syntaxes are described as follows.

scaling_window_flag equal to 1 specifies that the scaling window offset parameters are present in the PPS. scaling_window_flag equal to 0 specifies that the scaling window offset parameters are not present in the PPS. When ref_pic_resampling_enabled_flag is equal to 0, the value of scaling_window_flag shall be equal to 0.

scaling_win_left_offset, scaling_win_right_offset, scaling_win_top_offset, and scaling_win_bottom_offset specify the offsets, in units of luma samples, that are applied to the picture size for scaling ratio calculation. When scaling_window_flag is equal to 0, the values of scaling_win_left_offset, scaling_win_right_offset, scaling_win_top_offset, and scaling_win_bottom_offset are inferred to be equal to 0.

The value of scaling_win_left_offset+scaling_win_right_offset shall be less than pic_width_in_luma_samples, and the value of scaling_win_top_offset+scaling_win_bottom_offset shall be less than pic_height_in_luma_samples.

The variables PicOutputWidthL and PicOutputHeightL are derived as follows: PicOutputWidthL=pic_width_in_luma_samples−(scaling_win_right_offset+scaling_win_left_offset). PicOutputHeightL=pic_height_in_luma_samples−(scaling_win_bottom_offset+scaling_win_top_offset).

fRefWidth is set equal to PicOutputWidthL of the reference picture RefPicList[i][j] in luma samples and fRefHeight is set equal to PicOutputHeightL of the reference picture RefPicList[i][j] in luma samples. RefPicScale[i][j][0]=((fRefWidth<<14)+(PicOutputWidthL>>1))/PicOutputWidthL. RefPicScale[i][j][1]=((fRefHeight<<14)+(PicOutputHeightL>>1))/PicOutputHeightL. RefPicIsScaled[i][j]=(RefPicScale[i][j][0]!=(1<<14))∥(RefPicScale[i][j][1]!=(1<<14)).

While RPR adds flexibility to the coded video bitstream, the motion compensation associated with the scaling of RPR causes increase in computation complexity as well as memory bandwidth. In order to alleviate the worst case memory bandwidth, the present invention discloses methods and apparatus to constrain the parameters related to RPR.

BRIEF SUMMARY OF THE INVENTION

Method and apparatus of coding a video sequence, are disclosed, wherein a Reference Picture Resampling (RPR) mode is supported. According to the method, a bitstream corresponding to encoded data of the video sequence is generated at an encoder side or received at a decoder side, where the bitstream complies with a bitstream conformance that one or more constraints are satisfied. The constraints are related to a set of RPR parameters comprising scaling window width or height of a current picture, scaling window width or height of a reference picture, current picture width or height, and maximum picture width or height specified for the video sequence. Scaling information for the RPR mode is derived using the set of RPR parameters. A target picture of the video sequence is then encoded at the encoder side or decoded at the decoder side by utilizing the scaling information when the RPR mode is enabled for the target picture.

In one embodiment, the constraints have no effect from any interpolation filter associated with RPR process. For example, the constraints may comprise that a first term value is smaller than or equal to (SpsMaxPicWidth*PicOutputWidthL), and wherein the first term value is determined by CurPicWidth and refPicOutputWidthL. The CurPicWidth corresponds to current picture width, the refPicOutputWidthL corresponds to the scaling window width of the reference picture, the PicOutputWidthL corresponds to the scaling window width of the current picture, and the SpsMaxPicWidth corresponds to maximum picture width as specified for the video sequence. In another example, the constraints may comprise that a second term value is smaller than or equal to (SpsMaxPicHeight*PicOutputHeight), and wherein the second term value is determined by CurPicHeight and refPicOutputHeight. The CurPicHeight corresponds to current picture height, the refPicOutputHeight corresponds to the scaling window height of the reference picture, the PicOutputHeight corresponds to the scaling window height of the current picture, and the SpsMaxPicHeight corresponds to maximum picture height as specified for the video sequence. In another example, the constraints may comprise that (CurPicWidth*refPicOutputWidthL) is smaller than or equal to (SpsMaxPicWidth*PicOutputWidthL). The CurPicWidth corresponds to current picture width, the refPicOutputWidthL corresponds to the scaling window width of the reference picture, the PicOutputWidthL corresponds to the scaling window width of the current picture, and the SpsMaxPicWidth corresponds to maximum picture width as specified for the video sequence. In another example, the constraints may comprise that (CurPicHeight*refPicOutputHeight) is smaller than or equal to (SpsMaxPicHeight*PicOutputHeight). The CurPicHeight corresponds to current picture height, the refPicOutputHeight corresponds to the scaling window height of the reference picture, the PicOutputHeight corresponds to the scaling window height of the current picture, and the SpsMaxPicHeight corresponds to maximum picture height as specified for the video sequence.

In one embodiment, the constraints comprise that (pic_width_in_luma_samples*pic_height_in_luma_samples*(16*refPicOutputWidthL+7*PicOutputWidthL)*(4*refPicOutputHeightL+7*PicOutputHeightL)) is smaller than or equal to (pic_width_max_in_luma_samples*pic_height_max_in_luma_samples height*253*PicOutputWidthL*PicOutputHeightL). In one embodiment, constraints comprise that (pic_width_in_luma_samples*pic_height_in_luma_samples*(4*refPicOutputWidthL+7*PicOutputWidthL)*(16*refPicOutputHeightL+7*PicOutputHeightL)) is smaller than or equal to (pic_width_max_in_luma_samples*pic_height_max_in_luma_samples height*253*PicOutputWidthL*PicOutputHeightL). The pic_width_in_luma_samples and the pic_height_in_luma_samples correspond to current picture width and height in luma samples respectively, the refPicOutputWidthL and the refPicOutputHeightL correspond to the scaling window width and height of the reference picture respectively, the PicOutputWidthL and the PicOutputHeightL correspond to the scaling window width and height of the current picture respectively, and the pic_width_max_in_luma_samples and the pic_height_max_in_luma_samples correspond to maximum picture width and height in the luma samples respectively.

In one embodiment, the constraints comprise that (CurPicWidth*CurPicHeight*refPicOutputWidthL*refPicOutputHeightL) is smaller than or equal to (SpsMaxPicWidth*SpsMaxPicHeight*PicOutputWidthL*PicOutputHeightL). The CurPicWidth and the CurPicHeight correspond to current picture width and height respectively, the refPicOutputWidthL and the refPicOutputHeightL correspond to the scaling window width and height of the reference picture respectively, the PicOutputWidthL and the PicOutputHeightL correspond to the scaling window width and height of the current picture respectively, and the SpsMaxPicWidth and the SpsMaxPicHeight correspond to maximum picture width and height respectively as specified for the video sequence.

In one embodiment, the constraints comprise that (pic_width_in_luma_samples*pic_height_in_luma_samples*(8*refPicOutputWidthL+7*PicOutputWidthL)*(8*refPicOutputHeightL+7*PicOutputHeightL) is smaller than or equal to (pic_width_max_in_luma_samples*pic_height_max_in_luma_samples height*225*PicOutputWidthL*PicOutputHeightL). The pic_width_in_luma_samples and the pic_height_in_luma_samples correspond to current picture width and height in luma samples respectively, the refPicOutputWidthL and the refPicOutputHeightL correspond to the scaling window width and height of the reference picture respectively, the PicOutputWidthL and the PicOutputHeightL correspond to the scaling window width and height of the current picture respectively, and the pic_width_max_in_luma_samples and the pic_height_max_in_luma_samples correspond to maximum picture width and height in the luma samples respectively.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a hypothetical example of Adaptive Resolution Change (ARC) with Reference Picture Resampling (RPR), where a current picture is predicted from reference pictures (Ref0 and Ref1) of different sizes.

FIG. 2 illustrates an exemplary flowchart of a method incorporating constrained Reference Picture Resampling (RPR) parameters according to an embodiment of the present invention.

DETAILED DESCRIPTION OF THE INVENTION

The following description is of the best-contemplated mode of carrying out the invention. This description is made for the purpose of illustrating the general principles of the invention and should not be taken in a limiting sense. The scope of the invention is best determined by reference to the appended claims.

It will be readily understood that the components of the present invention, as generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the following more detailed description of the embodiments of the systems and methods of the present invention, as represented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention.

Reference throughout this specification to “one embodiment,” “an embodiment,” or similar language means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present invention. Thus, appearances of the phrases “in one embodiment” or “in an embodiment” in various places throughout this specification are not necessarily all referring to the same embodiment.

Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. One skilled in the relevant art will recognize, however, that the invention can be practiced without one or more of the specific details, or with other methods, components, etc. In other instances, well-known structures, or operations are not shown or described in detail to avoid obscuring aspects of the invention.

The illustrated embodiments of the invention will be best understood by reference to the drawings, wherein like parts are designated by like numerals throughout. The following description is intended only by way of example, and simply illustrates certain selected embodiments of apparatus and methods that are consistent with the invention as claimed herein.

In the description like reference numbers appearing in the drawings and description designate corresponding or like elements among the different views.

According to VVC, the derived reference picture scaling ratio (RefPicScale[i][j][0], RefPicScale[i][j][1]) are used for motion compensation. The RefPicScale is derived from the scaling window size/width/height specified in PPS. It affects which filters shall be used in motion compensation stage, and also affects the memory bandwidth used for the motion compensation. For example, for a 16×16 block, when performing the motion compensation, it requires a (16+L−1)×(16+L−1) reference block if the scaling ratio is equal to 1 (e.g. the RefPicScale[i][j][0] and RefPicScale[i][j][1] all equal to 16384), where the L is the filter-tap length of the motion compensation. In SPS, the maximum picture size of the sequence is specified. According to the maximum picture size, the worst case bandwidth can be calculated and constrained. However, when the scaling ratio is equal to 2 (e.g. the RefPicScale[i][j][0] and RefPicScale[i][j][1] all equal to 32768), it requires a (32+L−1)×(32+L−1) reference block. The bandwidth is almost four times when the effect of the filter-tap length is taken into consideration. The required bandwidth is affected by the scaling ratio. For example, if a current picture with size equal to the maximum picture size, and the scaling ratio of one of the reference picture is larger than 1, the required bandwidth of this current picture might be larger than what the system expects. In order to constrain the worst case bandwidth, several methods are proposed.

Method-1: Constraint on the Scaling Ratio

In this invention, the scaling ratio of (the reference picture size to the current picture size) is constrained to be not larger than the ratio of (the maximum picture size in SPS to the current picture size). For example, the scaling_ratio_x*current_picture_width*scaling_ratio_y*current_picture_height shall be smaller than or equal to max_picture_width*max_picture_height. The current_picture_width or height can be the picture width or height (e.g. signaled or derived in PPS), or the conformance window (e.g. signaled or derived in PPS), or the scaling window (e.g. signaled or derived in PPS). The max_picture_width or max_picture_height can be the maximum picture width or height of the current sequence (e.g. signaled or derived in SPS). In one embodiment, the scaling_ratio_x and scaling_ratio_y can be the RefPicIsScaled[ ][ ][0] and RefPicIsScaled[ ][ ][1]. For example, RefPicIsScaled[ ][ ][0]*current_picture_width*RefPicIsScaled[ ][ ][1]*current_picture_height shall be smaller than or equal to max_picture_width*max_picture_height*2{circumflex over ( )}K, or ((RefPicIsScaled[ ][ ][0]*RefPicIsScaled[ ][ ][1]*current_picture_width*current_picture_height)>>K) shall be smaller than or equal to max_picture_width*max_picture_height. K can be 28.

In another embodiment, the horizontal scaling ratio and vertical scaling can be constrained separately. For example, the horizontal and vertical scaling ratio of (the reference picture size to the current picture size) is constrained to be no larger than the ratio of (the maximum picture width in SPS to the current picture width) and the ratio of (the maximum picture height in SPS to the current picture height), respectively. For example, the scaling_ratio_x*current_picture_width shall be smaller than or equal to max_picture_width. The scaling_ratio_y*current_picture_height shall be smaller than or equal to max_picture_height. The current_picture_width or height can be the picture width or height (e.g. signaled or derived in PPS), or the conformance window (e.g. signaled or derived in PPS), or the scaling window (e.g. signaled or derived in PPS). The max_picture_width or max_picture_height can be the maximum picture width or height of the current sequence (e.g. signaled or derived in SPS). In one embodiment, the scaling_ratio_x and scaling_ratio_y can be the RefPicIsScaled[ ][ ][0] and RefPicIsScaled[ ][ ][1]. For example, RefPicIsScaled[ ][ ][0]*current_picture_width shall be smaller than or equal to max_picture_2{circumflex over ( )}K, or ((RefPicIsScaled[ ][ ][0]*current_picture_width)>>K) shall be smaller than or equal to max_picture_width. Similarly, RefPicIsScaled[ ][ ][1]*current_picture_height shall be smaller than or equal to max_picture_height*2{circumflex over ( )}K, or ((RefPicIsScaled[ ][ ][1]*current_picture_height)>>K) shall be smaller than or equal to max_picture_height. K can be 14.

In another embodiment, the size of the scaling window, current picture size, reference picture size, and/or maximum picture size in the current sequence is constrained. For example, let refPicOutputWidthL and refPicOutputHeightL be the PicOutputWidthL and PicOutputHeightL, respectively, of a reference picture of a current picture referring to this PPS. It is a requirement of bitstream conformance that a value determined by all refPicOutputWidthL, current_picture_width, refPicOutputHeightL, and current_picture_height shall be smaller than or equal to PicOutputWidthL*max_picture_width*PicOutputHeightL*max_picture_height. For example, it is a requirement of bitstream conformance that all of the following condition is satisfied: refPicOutputWidthL*current_picture_width*refPicOutputHeightL*current_picture_height shall be smaller than or equal to PicOutputWidthL*max_picture_width*PicOutputHeightL*max_picture_height.

In another embodiment, the width and height of the scaling window, the width and height of current picture, the width and height of reference picture, and/or the maximum width and height of picture in the current sequence are constrained separately. For example, let refPicOutputWidthL and refPicOutputHeightL be the PicOutputWidthL and PicOutputHeightL, respectively, of a reference picture of a current picture referring to this PPS. It is a requirement of bitstream conformance that a first value determined by all refPicOutputWidthL, and current_picture_width, refPicOutputHeightL shall be smaller than or equal to PicOutputWidthL*max_picture_width; and a second value determined by refPicOutputHeightL and current_picture_height shall be smaller than or equal to PicOutputHeightL*max_picture_height. For example, it is a requirement of bitstream conformance that all of the following conditions are satisfied: refPicOutputWidthL*current_picture_width shall be smaller than or equal to PicOutputWidthL*max_picture_width, refPicOutputHeightL*current_picture_height shall be smaller than or equal to PicOutputHeightL*max_picture_height.

The current_picture_width and current_picture_height can be the picture width and height signaled in SPS or PPS. For example, the picture width and height can be the pic_width_in_luma_samples and pic_height_in_luma_samples, or can be the width and height of conformance cropping window, or can be the width and height of the scaling window.

In another embodiment, the interpolation filter is considered. The worst case MC memory bandwidth of a current picture is equal to CurPicWidth*CurPicHeight*WorstCaseBlockBW/WorstCaseBlockSize. Therefore, if the following condition is satisfied, the worst case MC memory bandwidth is not increased. CurPicWidth*CurPicHeight*(8*ScalingRatioX+7)*(8*ScalingRatioY+7)/(8*8)<=SpsMaxPicWidth*SpsMaxPicHeight*(8+7)*(8+7)/(8*8).

In the above equation, the ScalingRatioX is equal to (refPicOutputWidthL/PicOutputWidthL), the ScalingRatioY is equal to (refPicOutputHeightL/PicOutputHeightL), SpsMaxPicWidth is the maximum picture width signalled in SPS, and SpsMaxPicHeight is the maximum picture height signalled in SPS.

After formula simplification, the above equation can be rewritten as follows. CurPicWidth*CurPicHeight*(8*refPicOutputWidthL+7*PicOutputWidthL)*(8*refPicOutputHeightL+7*PicOutputHeightL)<=SpsMaxPicWidth*SpsMaxPicHeight*225*PicOutputWidthL*PicOutputHeightL.

Similarly, for chroma components, the constraint is as follows. CurPicWidth*CurPicHeight*(8/SubWidthC*refPicOutputWidthL+3*PicOutputWidthL)*(8/SubHeightC*refPicOutputHeightL+3*PicOutputHeightL)<=SpsMaxPicWidth*SpsMaxPicHeight*(8/SubWidthC+3)*(8/SubHeightC+3)*PicOutputWidthL*PicOutputHeightL.

In the above equation, (SubWidthC, SubHeightC) is (2, 2), (2, 1), and (1, 1) for 4:2:0, 4:2:2, and 4:4:4, respectively.

The proposed text for the scaling window sizes is as follows.

scaling_win_left_offset, scaling_win_right_offset, scaling_win_top_offset, and scaling_win_bottom_offset specify the offsets, in units of luma samples, that are applied to the picture size for scaling ratio calculation. When scaling_window_flag is equal to 0, the values of scaling_win_left_offset, scaling_win_right_offset, scaling_win_top_offset, and scaling_win_bottom_offset are inferred to be equal to 0.

The value of scaling_win_left_offset+scaling_win_right_offset shall be less than pic_width_in_luma_samples, and the value of scaling_win_top_offset+scaling_win_bottom_offset shall be less than pic_height_in_luma_samples.

The variables PicOutputWidthL and PicOutputHeightL are derived as follows: PicOutputWidthL=pic_width_in_luma_samples−(scaling_win_right_offset+scaling_win_left_offset). PicOutputHeightL=pic_height_in_luma_samples−(scaling_win_bottom_offset+scaling_win_top_offset).

In another example, the scaling_win_left_offset, scaling_win_right_offset, scaling_win_top_offset, and scaling_win_bottom_offset can be signalled in units of chroma samples. The variables PicOutputWidthL and PicOutputHeightL are derived as follows: PicOutputWidthL=pic_width_in_luma_samples−SubWidthC*(scaling_win_right_offset+scaling_win_left_offset). PicOutputHeightL=pic_height_in_luma_samples−SubHeightC*(scaling_win_bottom_offset+scaling_win_top_offset).

Where the SubWidthC and SubHeightC specify the sample ratio of luma sample to chroma sample in horizontal and vertical direction, respectively.

According to one embodiment, the following constraints are imposed. When scaling_window_flag is equal to 1, let refPicOutputWidthL and refPicOutputHeightL be the PicOutputWidthL and PicOutputHeightL, respectively, of a reference picture of the current picture referring to this PPS. It is a requirement of bitstream conformance that the following conditions are satisfied: pic_width_in_luma_samples*pic_height_in_luma_samples*(8*refPicOutputWidthL+7*PicOutputWidthL)*(8*refPicOutputHeightL+7*PicOutputHeightL) shall be smaller than or equal to pic_width_max_in_luma_samples*pic_height_max_in_luma_samples height*225*PicOutputWidthL*PicOutputHeightL. pic_width_in_luma_samples*pic_height_in_luma_samples*(8/SubWidthC*refPicOutputWidthL+3*PicOutputWidthL)*(8/SubHeightC*refPicOutputHeightL+3*PicOutputHeightL) shall be smaller than or equal to pic_width_max_in_luma_samples*pic_height_max_in_luma_samples height*(8/SubWidthC+3)*(8/SubHeightC+3)*PicOutputWidthL*PicOutputHeightL.

In another method, we can just take the luma component into account. The proposed text for the scaling window sizes is as follows.

scaling_win_left_offset, scaling_win_right_offset, scaling_win_top_offset, and scaling_win_bottom_offset specify the offsets, in units of luma samples, that are applied to the picture size for scaling ratio calculation. When scaling_window_flag is equal to 0, the values of scaling_win_left_offset, scaling_win_right_offset, scaling_win_top_offset, and scaling_win_bottom_offset are inferred to be equal to 0.

The value of scaling_win_left_offset+scaling_win_right_offset shall be less than pic_width_in_luma_samples, and the value of scaling_win_top_offset+scaling_win_bottom_offset shall be less than pic_height_in_luma_samples.

The variables PicOutputWidthL and PicOutputHeightL are derived as follows: PicOutputWidthL=pic_width_in_luma_samples−(scaling_win_right_offset+scaling_win_left_offset). PicOutputHeightL=pic_height_in_luma_samples−(scaling_win_bottom_offset+scaling_win_top_offset).

According to one embodiment, the following constraints are imposed. When scaling_window_flag is equal to 1, let refPicOutputWidthL and refPicOutputHeightL be the PicOutputWidthL and PicOutputHeightL, respectively, of a reference picture of the current picture referring to this PPS. It is a requirement of bitstream conformance that the following condition is satisfied: pic_width_in_luma_samples*pic_height_in_luma_samples*(8*refPicOutputWidthL+7*PicOutputWidthL)*(8*refPicOutputHeightL+7*PicOutputHeightL) shall be smaller than or equal to pic_width_max_in_luma_samples*pic_height_max_in_luma_samples height*225*PicOutputWidthL*PicOutputHeightL.

Note that, the number of 8, 7, and 3 above can be replaced by other numbers. For example, after formula simplification, it can be rewritten as follows. CurPicWidth*CurPicHeight*(M*refPicOutputWidthL+N*PicOutputWidthL)*(O*refPicOutputHeightL+P*PicOutputHeightL)<=SpsMaxPicWidth*SpsMaxPicHeight*(M+N)*(O+P)*PicOutputWidthL*PicOutputHeightL.

Similarly, for chroma components, the constraint is as follows. CurPicWidth*CurPicHeight*(A/SubWidthC*refPicOutputWidthL+B*PicOutputWidthL)*(C/SubHeightC*refPicOutputHeightL+D*PicOutputHeightL)<=SpsMaxPicWidth*SpsMaxPicHeight*(A/SubWidthC+B)*(C/SubHeightC+D)*PicOutputWidthL*PicOutputHeightL.

In the above equation, (SubWidthC, SubHeightC) is (2, 2), (2, 1), and (1, 1) for 4:2:0, 4:2:2, and 4:4:4, respectively.

In one embodiment, the M and O can be 1, N and P can be 0, A and C can be 1 or 2, B and D can be 0.

In one embodiment, the 16×4 and 4×16 are used as block size to calculate the worst case bandwidth. The constraints can be rewritten as follow.

After formula simplification, it can be rewritten as follows: CurPicWidth*CurPicHeight*(16*refPicOutputWidthL+7*PicOutputWidthL)*(4*refPicOutputHeightL+7*PicOutputHeightL)<=SpsMaxPicWidth*SpsMaxPicHeight*253*PicOutputWidthL*PicOutputHeightL, CurPicWidth*CurPicHeight*(4*refPicOutputWidthL+7*PicOutputWidthL)*(16*refPicOutputHeightL+7*PicOutputHeightL)<=SpsMaxPicWidth*SpsMaxPicHeight*253*PicOutputWidthL*PicOutputHeightL.

Similarly, for chroma components, the constraint is as follows: CurPicWidth*CurPicHeight*(16/SubWidthC*refPicOutputWidthL+3*PicOutputWidthL)*(4/SubHeightC*refPicOutputHeightL+3*PicOutputHeightL)<=SpsMaxPicWidth*SpsMaxPicHeight*(16/SubWidthC+3)*(4/SubHeightC+3)*PicOutputWidthL*PicOutputHeightL, CurPicWidth*CurPicHeight*(4/SubWidthC*refPicOutputWidthL+3*PicOutputWidthL)*(16/SubHeightC*refPicOutputHeightL+3*PicOutputHeightL)<=SpsMaxPicWidth*SpsMaxPicHeight*(4/SubWidthC+3)*(16/SubHeightC+3)*PicOutputWidthL*PicOutputHeightL.

In the above equations, (SubWidthC, SubHeightC) is (2, 2), (2, 1), and (1, 1) for 4:2:0, 4:2:2, and 4:4:4, respectively.

The proposed text for the scaling window sizes is as follows.

scaling_win_left_offset, scaling_win_right_offset, scaling_win_top_offset, and scaling_win_bottom_offset specify the offsets, in units of luma samples, that are applied to the picture size for scaling ratio calculation. When scaling_window_flag is equal to 0, the values of scaling_win_left_offset, scaling_win_right_offset, scaling_win_top_offset, and scaling_win_bottom_offset are inferred to be equal to 0.

The value of scaling_win_left_offset+scaling_win_right_offset shall be less than pic_width_in_luma_samples, and the value of scaling_win_top_offset+scaling_win_bottom_offset shall be less than pic_height_in_luma_samples.

The variables PicOutputWidthL and PicOutputHeightL are derived as follows: PicOutputWidthL=pic_width_in_luma_samples−(scaling_win_right_offset+scaling_win_left_offset). PicOutputHeightL=pic_height_in_luma_samples−(scaling_win_bottom_offset+scaling_win_top_offset).

According to one embodiment, the following constraints are imposed. When scaling_window_flag is equal to 1, let refPicOutputWidthL and refPicOutputHeightL be the PicOutputWidthL and PicOutputHeightL, respectively, of a reference picture of the current picture referring to this PPS. It's a requirement of bitstream conformance that the following conditions are satisfied: pic_width_in_luma_samples*pic_height_in_luma_samples*(16*refPicOutputWidthL+7*PicOutputWidthL)*(4*refPicOutputHeightL+7*PicOutputHeightL) shall be smaller than or equal to pic_width_max_in_luma_samples*pic_height_max_in_luma_samples height*253*PicOutputWidthL*PicOutputHeightL. pic_width_in_luma_samples*pic_height_in_luma_samples*(4*refPicOutputWidthL+7*PicOutputWidthL)*(16*refPicOutputHeightL+7*PicOutputHeightL) shall be smaller than or equal to pic_width_max_in_luma_samples*pic_height_max_in_luma_samples height*253*PicOutputWidthL*PicOutputHeightL. pic_width_in_luma_samples*pic_height_in_luma_samples*(16/SubWidthC*refPicOutputWidthL+3*PicOutputWidthL)*(4/SubHeightC*refPicOutputHeightL+3*PicOutputHeightL) shall be smaller than or equal to pic_width_max_in_luma_samples*pic_height_max_in_luma_samples height*(16/SubWidthC+3)*(4/SubHeightC+3)*PicOutputWidthL*PicOutputHeightL. pic_width_in_luma_samples*pic_height_in_luma_samples*(4/SubWidthC*refPicOutputWidthL+3*PicOutputWidthL)*(16/SubHeightC*refPicOutputHeightL+3*PicOutputHeightL) shall be smaller than or equal to pic_width_max_in_luma_samples*pic_height_max_in_luma_samples height*(4/SubWidthC+3)*(16/SubHeightC+3)*PicOutputWidthL*PicOutputHeightL.

Also, in another example, we can just take the luma component into account.

In another embodiment, a tolerance ratio can be invoked. For example, the Ty can be the tolerance value for luma. The Tc can be the tolerance value for chroma. Ty and Tc can be integer or a real number (e.g. 1.0, 1.2, 1.1, 1.5, etc.).

For example, after formula simplification, the constraint can be rewritten as follows. CurPicWidth*CurPicHeight*(M*refPicOutputWidthL+N*PicOutputWidthL)*(O*refPicOutputHeightL+P*PicOutputHeightL)<=SpsMaxPicWidth*SpsMaxPicHeight*(M+N)*(O+P)*PicOutputWidthL*PicOutputHeightL*Ty.

Similarly, for chroma components, the constraint is as follows. CurPicWidth*CurPicHeight*(A/SubWidthC*refPicOutputWidthL+B*PicOutputWidthL)*(C/SubHeightC*refPicOutputHeightL+D*PicOutputHeightL)<=SpsMaxPicWidth*SpsMaxPicHeight*(A/SubWidthC+B)*(C/SubHeightC+D)*PicOutputWidthL*PicOutputHeightL*Tc,

In the above equation, (SubWidthC, SubHeightC) is (2, 2), (2, 1), and (1, 1) for 4:2:0, 4:2:2, and 4:4:4, respectively.

In one example, the M and O can be 1, N and P can be 0, A and C can be 1 or 2, B and D can be 0. In one example, the M and O can be 8, N and P can be 7 or 8, A and C can be 8, B and D can be 3 or 4. In one example, the M can be 16 O can be 4, N and P can be 7 or 8, A can be 16 and C can be 4, B and D can be 3 or 4. In one example, the M can be 4 O can be 16, N and P can be 7 or 8, A can be 4 and C can be 16, B and D can be 3 or 4.

In another embodiment, the vertical and horizontal direction constraints can be separated. For example, after formula simplification, the constraints can be rewritten as follows. CurPicWidth*(M*refPicOutputWidthL+N*PicOutputWidthL)<=SpsMaxPicWidth*(M+N)*PicOutputWidthL*Ty_x. CurPicHeight*(O*refPicOutputHeightL+P*PicOutputHeightL)<=SpsMaxPicHeight*(O+P)*PicOutputHeightL*Ty_y.

Similarly, for chroma components, the constraints are as follows. CurPicWidth*(A/SubWidthC*refPicOutputWidthL+B*PicOutputWidthL)<=SpsMaxPicWidth*(A/SubWidthC+B)*PicOutputWidthL*Tc_x. CurPicHeight*(C/SubHeightC*refPicOutputHeightL+D*PicOutputHeightL)<=SpsMaxPicHeight*(C/SubHeightC+D)*PicOutputHeightL*Tc_y.

In the above equations, (SubWidthC, SubHeightC) is (2, 2), (2, 1), and (1, 1) for 4:2:0, 4:2:2, and 4:4:4, respectively.

In one example, after formula simplification, the constraints can be rewritten as follows. CurPicWidth*(16*refPicOutputWidthL+7*PicOutputWidthL)<=SpsMaxPicWidth*(16+7)*PicOutputWidthL*Ty_x. CurPicHeight*(4*refPicOutputHeightL+7*PicOutputHeightL)<=SpsMaxPicHeight*(4+7)*PicOutputHeightL*Ty_y. CurPicWidth*(4*refPicOutputWidthL+7*PicOutputWidthL)<=SpsMaxPicWidth*(4+7)*PicOutputWidthL*Ty_x. CurPicHeight*(16*refPicOutputHeightL+7*PicOutputHeightL)<=SpsMaxPicHeight*(16+7)*PicOutputHeightL*Ty_y.

In another example, the constraints can be rewritten as follows: CurPicWidth*(4*refPicOutputWidthL+7*PicOutputWidthL)<=SpsMaxPicWidth*(4+7)*PicOutputWidthL*Ty_x. CurPicHeight*(4*refPicOutputHeightL+7*PicOutputHeightL)<=SpsMaxPicHeight*(4+7)*PicOutputHeightL*Ty_y.

In another example, the constraints can be rewritten as follows: CurPicWidth*(16*refPicOutputWidthL+7*PicOutputWidthL)<=SpsMaxPicWidth*(16+7)*PicOutputWidthL*Ty_x. CurPicHeight*(16*refPicOutputHeightL+7*PicOutputHeightL)<=SpsMaxPicHeight*(16+7)*PicOutputHeightL*Ty_y.

Similarly, for chroma components, the constraints are as follows: CurPicWidth*(16/SubWidthC*refPicOutputWidthL+3*PicOutputWidthL)<=SpsMaxPicWidth*(16/SubWidthC+3)*PicOutputWidthL*Tc_x. CurPicHeight*(4/SubHeightC*refPicOutputHeightL+3*PicOutputHeightL)<=SpsMaxPicHeight*(4/SubHeightC+3)*PicOutputHeightL*Tc_y. CurPicWidth*(4/SubWidthC*refPicOutputWidthL+3*PicOutputWidthL)<=SpsMaxPicWidth*(4/SubWidthC+3)*PicOutputWidthL*Tc_x. CurPicHeight*(16/SubHeightC*refPicOutputHeightL+3*PicOutputHeightL)<=SpsMaxPicHeight*(16/SubHeightC+3)*PicOutputHeightL*Tc_y.

In another example, the constraints can be rewritten as follows: CurPicWidth*(4/SubWidthC*refPicOutputWidthL+3*PicOutputWidthL)<=SpsMaxPicWidth*(4/SubWidthC+3)*PicOutputWidthL*Tc_x. CurPicHeight*(4/SubHeightC*refPicOutputHeightL+3*PicOutputHeightL)<=SpsMaxPicHeight*(4/SubHeightC+3)*PicOutputHeightL*Tc_y.

In another example, the constraints can be rewritten as follows: CurPicWidth*(16/SubWidthC*refPicOutputWidthL+3*PicOutputWidthL)<=SpsMaxPicWidth*(16/SubWidthC+3)*PicOutputWidthL*Tc_x. CurPicHeight*(16/SubHeightC*refPicOutputHeightL+3*PicOutputHeightL)<=SpsMaxPicHeight*(16/SubHeightC+3)*PicOutputHeightL*Tc_y.

In the above equations, (SubWidthC, SubHeightC) is (2, 2), (2, 1), and (1, 1) for 4:2:0, 4:2:2, and 4:4:4, respectively.

In another embodiment, the filter tap length can be ignored. For example, after formula simplification, the constraint can be rewritten as follows: CurPicWidth*CurPicHeight*refPicOutputWidthL*refPicOutputHeightL<=SpsMaxPicWidth*SpsMaxPicHeight*PicOutputWidthL*PicOutputHeightL*T.

In another example, the constraints can be rewritten as follows: CurPicWidth*refPicOutputWidthL<=SpsMaxPicWidth*PicOutputWidthL*Tx. CurPicHeight*refPicOutputHeightL<=SpsMaxPicHeight*PicOutputHeightL*Ty.

In another embodiment, in the above mentioned method, the picture or scaling window width or height can be replaced by number of CTU in picture/scaling window width/height.

Method-2: Disabling Small Inter Block when the Scaling Ratio is Larger than a Threshold.

For motion compensation, because of the effect of interpolation filter, the smaller block requires larger bandwidth per sample. To reduce the memory bandwidth, it is proposed to disable the small inter blocks when the scaling ratio is larger than a threshold. For example, when the scaling ratio is larger than K, or larger than or equal to K, the inter blocks with height and/or height smaller than N are disabled. In another example, when the scaling ratio is larger than K, the inter blocks with area smaller than M are disabled. K can be 1, 1.25, 1.5, 1.75, or 2.0. N can be 8, 16, or 32. M can be 32, 64, 128, 256, 512, or 1024.

In one embodiment, the RefPicIsScaled[ ][ ][0] and/or RefPicIsScaled[ ][ ][1] can be used. For example, when the RefPicIsScaled[ ][ ][0] and/or RefPicIsScaled[ ][ ][1] is larger than K or larger than or equal to K, the inter blocks with height and/or height smaller than N are disabled. In another example, when the RefPicIsScaled[ ][ ][0] and/or RefPicIsScaled[ ][ ][1] is larger than K, the inter blocks with area smaller than M are disabled. K can be (1, 1.25, 1.5, 1.75, or 2.0)*2{circumflex over ( )}P, where P can be 14. N can be 8, 16, or 32. M can be 32, 64, 128, 256, 512, or 1024.

Method-3: No Inter Prediction Outside the Current Scaling Window

In the proposed method, if the current CU is outside the current picture scaling window, the encoder should not use inter mode for this CU. Therefore, the bitstream should have the conformance that the CU outside the scaling window should all not be inter mode. In another embodiment, the related syntax can be saved. For example, any CU outside the scaling window will only need to send syntax related to intra mode so that all inter mode related syntax can be saved. This method will also guarantee the worst case bandwidth.

In the methods disclosed above, the constraints on scaling for RPR are illustrated in various equations or formulas. These equations or formulas are not intended to provide an exhaustive list of possible implementation based on embodiments of the present invention. As known in the field, these equations or formulas may have various forms by rearranging or regrouping the terms in these equations or formulas. The embodiments of the present invention cover all equivalent equations or formulas.

Any of the foregoing proposed methods can be implemented in encoders and/or decoders. For example, any of the proposed methods can be implemented in a scaling or motion compensation module or parameter determining module of an encoder, and/or a scaling or motion compensation module or parameter determining module of a decoder. Alternatively, any of the proposed methods can be implemented as one or more circuits coupled to the scaling or motion compensation module or parameter determining module of the encoder and/or the scaling or motion compensation module or parameter determining module decoder, so as to provide the information needed by the scaling or motion compensation module or parameter determining module.

Video encoders have to follow the foregoing syntax design so as to generate the legal bitstream, and video decoders are able to decode the bitstream correctly only if the parsing process is complied with the foregoing syntax design. When the syntax is skipped in the bitstream, encoders and decoders should set the syntax value as the inferred value to guarantee the encoding and decoding results are matched.

FIG. 2 illustrates an exemplary flowchart of a method incorporating constrained Reference Picture Resampling (RPR) parameters according to an embodiment of the present invention. The steps shown in the flowchart, as well as other following flowcharts in this disclosure, may be implemented as program codes executable on one or more processors (e.g., one or more CPUs) at the encoder side and/or the decoder side. The steps shown in the flowchart may also be implemented based hardware such as one or more electronic devices or processors arranged to perform the steps in the flowchart. According to this method, a bitstream corresponding to encoded data of the video sequence is generated at an encoder side or received at a decoder side in step 210, where the bitstream complies with a bitstream conformance that one or more constraints are satisfied, the constraints are related to a set of RPR parameters comprising scaling window width or height of a current picture, scaling window width or height of a reference picture, current picture width or height, and maximum picture width or height specified for the video sequence, and wherein scaling information for the RPR mode is derived using the set of RPR parameters. A target picture of the video sequence is then encoded at the encoder side or decoded at the decoder side by utilizing the scaling information in step 220 when the RPR mode is enabled for the target picture.

The flowchart shown above is intended for serving as examples to illustrate embodiments of the present invention. A person skilled in the art may practice the present invention by modifying individual steps, splitting or combining steps with departing from the spirit of the present invention.

The above description is presented to enable a person of ordinary skill in the art to practice the present invention as provided in the context of a particular application and its requirement. Various modifications to the described embodiments will be apparent to those with skill in the art, and the general principles defined herein may be applied to other embodiments. Therefore, the present invention is not intended to be limited to the particular embodiments shown and described, but is to be accorded the widest scope consistent with the principles and novel features herein disclosed. In the above detailed description, various specific details are illustrated in order to provide a thorough understanding of the present invention. Nevertheless, it will be understood by those skilled in the art that the present invention may be practiced.

Embodiment of the present invention as described above may be implemented in various hardware, software codes, or a combination of both. For example, an embodiment of the present invention can be one or more electronic circuits integrated into a video compression chip or program code integrated into video compression software to perform the processing described herein. An embodiment of the present invention may also be program code to be executed on a Digital Signal Processor (DSP) to perform the processing described herein. The invention may also involve a number of functions to be performed by a computer processor, a digital signal processor, a microprocessor, or field programmable gate array (FPGA). These processors can be configured to perform particular tasks according to the invention, by executing machine-readable software code or firmware code that defines the particular methods embodied by the invention. The software code or firmware code may be developed in different programming languages and different formats or styles. The software code may also be compiled for different target platforms. However, different code formats, styles and languages of software codes and other means of configuring code to perform the tasks in accordance with the invention will not depart from the spirit and scope of the invention.

The invention may be embodied in other specific forms without departing from its spirit or essential characteristics. The described examples are to be considered in all respects only as illustrative and not restrictive. The scope of the invention is therefore, indicated by the appended claims rather than by the foregoing description. All changes which come within the meaning and range of equivalency of the claims are to be embraced within their scope. 

The invention claimed is:
 1. A method for coding a video sequence, wherein a Reference Picture Resampling (RPR) mode is supported, the method comprising: generating, at an encoder side, or receiving, at a decoder side, a bitstream corresponding to encoded data of the video sequence, wherein the bitstream complies with a bitstream conformance that one or more constraints are satisfied, wherein said one or more constraints are related to a set of RPR parameters comprising scaling window width or height of a current picture, scaling window width or height of a reference picture, current picture width or height, and maximum picture width or height specified for the video sequence, and wherein scaling information for the RPR mode is derived using the set of RPR parameters, wherein said one or more constraints comprise that a first term value is smaller than or equal to (SpsMaxPicWidth*PicOutputWidthL), and wherein the first term value is determined according to CurPicWidth and refPicOutputWidthL, and wherein the CurPicWidth corresponds to current picture width, the refPicOutputWidthL corresponds to the scaling window width of the reference picture, the PicOutputWidthL corresponds to the scaling window width of the current picture, and the SpsMaxPicWidth corresponds to maximum picture width as specified for the video sequence; and encoding, at the encoder side, or decoding at the decoder side, a target picture of the video sequence, utilizing the scaling information.
 2. The method of claim 1, wherein said one or more constraints comprise that (CurPicWidth*refPicOutputWidthL) is smaller than or equal to (SpsMaxPicWidth*PicOutputWidthL), and wherein the CurPicWidth corresponds to current picture width, the refPicOutputWidthL corresponds to the scaling window width of the reference picture, the PicOutputWidthL corresponds to the scaling window width of the current picture, and the SpsMaxPicWidth corresponds to maximum picture width as specified for the video sequence.
 3. The method of claim 1, wherein said one or more constraints comprise that a second term value is smaller than or equal to (SpsMaxPicHeight*PicOutputHeight), and wherein the second term value is determined according to CurPicHeight and refPicOutputHeight, and wherein the CurPicHeight corresponds to current picture height, the refPicOutputHeight corresponds to the scaling window height of the reference picture, the PicOutputHeight corresponds to the scaling window height of the current picture, and the SpsMaxPicHeight corresponds to maximum picture height as specified for the video sequence.
 4. The method of claim 1, wherein said one or more constraints comprise that (CurPicHeight*refPicOutputHeight) is smaller than or equal to (SpsMaxPicHeight*PicOutputHeight), and wherein the CurPicHeight corresponds to current picture height, the refPicOutputHeight corresponds to the scaling window height of the reference picture, the PicOutputHeight corresponds to the scaling window height of the current picture, and the SpsMaxPicHeight corresponds to maximum picture height as specified for the video sequence.
 5. The method of claim 1, wherein said one or more constraints comprise that (pic_width_in_luma_samples*pic_height_in_luma_samples*(16*refPicOutputWidthL+7*PicOutputWidthL)*(4*refPicOutputHeightL+7*PicOutputHeightL)) is smaller than or equal to (pic_width_max_in_luma_samples*pic_height_max_in_luma_samples height*253*PicOutputWidthL*PicOutputHeightL), and wherein the pic_width_in_luma_samples and the pic_height_in_luma_samples correspond to current picture width and height in luma samples respectively, the refPicOutputWidthL and the refPicOutputHeightL correspond to the scaling window width and height of the reference picture respectively, the PicOutputWidthL and the PicOutputHeightL correspond to the scaling window width and height of the current picture respectively, and the pic_width_max_in_luma_samples and the pic_height_max_in_luma_samples correspond to maximum picture width and height in the luma samples respectively.
 6. The method of claim 1, wherein said one or more constraints comprise that (pic_width_in_luma_samples*pic_height_in_luma_samples*(4*refPicOutputWidthL+7*PicOutputWidthL)*(16*refPicOutputHeightL+7*PicOutputHeightL)) is smaller than or equal to (pic_width_max_in_luma_samples*pic_height_max_in_luma_samples height*253*PicOutputWidthL*PicOutputHeightL), and wherein the pic_width_in_luma_samples and the pic_height_in_luma_samples correspond to current picture width and height in luma samples respectively, the refPicOutputWidthL and the refPicOutputHeightL correspond to the scaling window width and height of the reference picture respectively, the PicOutputWidthL and the PicOutputHeightL correspond to the scaling window width and height of the current picture respectively, and the pic_width_max_in_luma_samples and the pic_height_max_in_luma_samples correspond to maximum picture width and height in the luma samples respectively.
 7. The method of claim 1, wherein said one or more constraints comprise that (CurPicWidth*CurPicHeight*refPicOutputWidthL*refPicOutputHeightL) is smaller than or equal to (SpsMaxPicWidth*SpsMaxPicHeight*PicOutputWidthL*PicOutputHeightL), and wherein the CurPicWidth and the CurPicHeight correspond to current picture width and height respectively, the refPicOutputWidthL and the refPicOutputHeightL correspond to the scaling window width and height of the reference picture respectively, the PicOutputWidthL and the PicOutputHeightL correspond to the scaling window width and height of the current picture respectively, and the SpsMaxPicWidth and the SpsMaxPicHeight correspond to maximum picture width and height respectively as specified for the video sequence.
 8. The method of claim 1, wherein said one or more constraints comprise that (pic_width_in_luma_samples*pic_height_in_luma_samples*(8*refPicOutputWidthL+7*PicOutputWidthL)*(8*refPicOutputHeightL+7*PicOutputHeightL) is smaller than or equal to (pic_width_max_in_luma_samples*pic_height_max_in_luma_samples height*225*PicOutputWidthL*PicOutputHeightL), and wherein the pic_width_in_luma_samples and the pic_height_in_luma_samples correspond to current picture width and height in luma samples respectively, the refPicOutputWidthL and the refPicOutputHeightL correspond to the scaling window width and height of the reference picture respectively, the PicOutputWidthL and the PicOutputHeightL correspond to the scaling window width and height of the current picture respectively, and the pic_width_max_in_luma_samples and the pic_height_max_in_luma_samples correspond to maximum picture width and height in the luma samples respectively.
 9. An apparatus for coding a video sequence, wherein a Reference Picture Resampling (RPR) mode is supported, the apparatus comprising one or more electronic circuits or processors arranged to: generate, at an encoder side, or receiving, at a decoder side, a bitstream corresponding to encoded data of the video sequence, wherein the bitstream complies with a bitstream conformance that one or more constraints are satisfied, wherein said one or more constraints are related to a set of RPR parameters comprising scaling window width or height of a current picture, scaling window width or height of a reference picture, current picture width or height, and maximum picture width or height specified for the video sequence, and wherein scaling information for the RPR mode is derived using the set of RPR parameters, wherein said one or more constraints comprise that a first term value is smaller than or equal to (SpsMaxPicWidth*PicOutputWidthL), and wherein the first term value is determined according to CurPicWidth and refPicOutputWidthL, and wherein the CurPicWidth corresponds to current picture width, the refPicOutputWidthL corresponds to the scaling window width of the reference picture, the PicOutputWidthL corresponds to the scaling window width of the current picture, and the SpsMaxPicWidth corresponds to maximum picture width as specified for the video sequence; and encode, at the encoder side, or decode at the decoder side, a target picture of the video sequence, utilizing the scaling information.
 10. The apparatus of claim 9, wherein said one or more constraints comprise that (CurPicWidth*refPicOutputWidthL) is smaller than or equal to (SpsMaxPicWidth*PicOutputWidthL), and wherein the CurPicWidth corresponds to current picture width, the refPicOutputWidthL corresponds to the scaling window width of the reference picture, the PicOutputWidthL corresponds to the scaling window width of the current picture, and the SpsMaxPicWidth corresponds to maximum picture width as specified for the video sequence.
 11. The apparatus of claim 9, wherein said one or more constraints comprise that a second term value is smaller than or equal to (SpsMaxPicHeight*PicOutputHeight), and wherein the second term value is determined according to CurPicHeight and refPicOutputHeight, and wherein the CurPicHeight corresponds to current picture height, the refPicOutputHeight corresponds to the scaling window height of the reference picture, the PicOutputHeight corresponds to the scaling window height of the current picture, and the SpsMaxPicHeight corresponds to maximum picture height as specified for the video sequence.
 12. The apparatus of claim 9, wherein said one or more constraints comprise that (CurPicHeight*refPicOutputHeight) is smaller than or equal to (SpsMaxPicHeight*PicOutputHeight), and wherein the CurPicHeight corresponds to current picture height, the refPicOutputHeight corresponds to the scaling window height of the reference picture, the PicOutputHeight corresponds to the scaling window height of the current picture, and the SpsMaxPicHeight corresponds to maximum picture height as specified for the video sequence.
 13. The apparatus of claim 9, wherein said one or more constraints comprise that (pic_width_in_luma_samples*pic_height_in_luma_samples*(16*refPicOutputWidthL+7*PicOutputWidthL)*(4*refPicOutputHeightL+7*PicOutputHeightL)) is smaller than or equal to (pic_width_max_in_luma_samples*pic_height_max_in_luma_samples height*253*PicOutputWidthL*PicOutputHeightL), and wherein the pic_width_in_luma_samples and the pic_height_in_luma_samples correspond to current picture width and height in luma samples respectively, the refPicOutputWidthL and the refPicOutputHeightL correspond to the scaling window width and height of the reference picture respectively, the PicOutputWidthL and the PicOutputHeightL correspond to the scaling window width and height of the current picture respectively, and the pic_width_max_in_luma_samples and the pic_height_max_in_luma_samples correspond to maximum picture width and height in the luma samples respectively.
 14. The apparatus of claim 9, wherein said one or more constraints comprise that (pic_width_in_luma_samples*pic_height_in_luma_samples*(4*refPicOutputWidthL+7*PicOutputWidthL)*(16*refPicOutputHeightL+7*PicOutputHeightL)) is smaller than or equal to (pic_width_max_in_luma_samples*pic_height_max_in_luma_samples height*253*PicOutputWidthL*PicOutputHeightL), and wherein the pic_width_in_luma_samples and the pic_height_in_luma_samples correspond to current picture width and height in luma samples respectively, the refPicOutputWidthL and the refPicOutputHeightL correspond to the scaling window width and height of the reference picture respectively, the PicOutputWidthL and the PicOutputHeightL correspond to the scaling window width and height of the current picture respectively, and the pic_width_max_in_luma_samples and the pic_height_max_in_luma_samples correspond to maximum picture width and height in the luma samples respectively.
 15. The apparatus of claim 9, wherein said one or more constraints comprise that (CurPicWidth*CurPicHeight*refPicOutputWidthL*refPicOutputHeightL) is smaller than or equal to (SpsMaxPicWidth*SpsMaxPicHeight*PicOutputWidthL*PicOutputHeightL), and wherein the CurPicWidth and the CurPicHeight correspond to current picture width and height respectively, the refPicOutputWidthL and the refPicOutputHeightL correspond to the scaling window width and height of the reference picture respectively, the PicOutputWidthL and the PicOutputHeightL correspond to the scaling window width and height of the current picture respectively, and the SpsMaxPicWidth and the SpsMaxPicHeight correspond to maximum picture width and height respectively as specified for the video sequence.
 16. The apparatus of claim 9, wherein said one or more constraints comprise that (pic_width_in_luma_samples*pic_height_in_luma_samples*(8*refPicOutputWidthL+7*PicOutputWidthL)*(8*refPicOutputHeightL+7*PicOutputHeightL) is smaller than or equal to (pic_width_max_in_luma_samples*pic_height_max_in_luma_samples height*225*PicOutputWidthL*PicOutputHeightL), and wherein the pic_width_in_luma_samples and the pic_height_in_luma_samples correspond to current picture width and height in luma samples respectively, the refPicOutputWidthL and the refPicOutputHeightL correspond to the scaling window width and height of the reference picture respectively, the PicOutputWidthL and the PicOutputHeightL correspond to the scaling window width and height of the current picture respectively, and the pic_width_max_in_luma_samples and the pic_height_max_in_luma_samples correspond to maximum picture width and height in the luma samples respectively. 